package com.fairytask.ui
{
	import com.fairytask.engine.components.button.Button;
	import com.fairytask.engine.components.clip.Clip;
	import com.fairytask.engine.define.UIDefine;
	import com.fairytask.resource.StaticIni;
	import com.fairytask.ui.base.FrameUI;
	import com.fairytask.ui.skillUnit.SkillProfileUI;
	
	/**
	 * 人物界面 
	 * @author xujh
	 * 
	 */
	public class MainSkillUI extends FrameUI
	{
		private static var _self		:MainSkillUI;
		public var mainBg		:Clip;	//主要显示部分背景
		private var _pageBtn	:Button;	//按钮
		private var _profileUI	:SkillProfileUI = SkillProfileUI.getInstance();
		
		public static function getInstance():MainSkillUI
		{
			if (_self == null)
			{
				_self=new MainSkillUI;
			}
			return _self;
		}
		
		public function MainSkillUI(popUI:Boolean=true)
		{
			super(popUI);
			init();
		}
		
		private function init():void
		{
			//左侧显示固定的人物属性面板
			windowBG.addChild(_profileUI);
			//设置面板显示位置
			btnBlank = 2;
			setBtnPos(266,29);
			setUnitPos(266,55);
			
			//技能及命格面板
			_pageBtn  = new Button(StaticIni.getSwfLangStr("1000000059"),46,25,"button_036");
			addButton(_pageBtn);
			_pageBtn  = new Button(StaticIni.getSwfLangStr("1000000060"),46,25,"button_036");
			_pageBtn.enabled = false;
			addButton(_pageBtn);
			addShowUI([[UIDefine.SkillUI]],0);
			addShowUI([[UIDefine.ChartUI]],1);
		}
	}
}